import request from '@/config/axios'

export interface PublicInterestLitigationVO {
                    id: number
                    type: string
                    name: string
                    content: string
                    phone: string
                    idCard: string
                    idCardUrl1: string
                    idCardUrl2: string
                    status: boolean
                    acceptUserName: string
                    acceptTime: Date
                    acceptUserId: number
                    acceptContent: string
                    auditingContent: string
                    auditingTime: Date
}

// 查询公益诉讼举报信息列表
export const getPublicInterestLitigationPage = async (params) => {
  return await request.get({ url: '/pro/public-interest-litigation/page', params })
}

// 查询公益诉讼举报信息详情
export const getPublicInterestLitigation = async (id: number) => {
  return await request.get({ url: '/pro/public-interest-litigation/get?id=' + id })
}

// 新增公益诉讼举报信息
export const createPublicInterestLitigation = async (data: PublicInterestLitigationVO) => {
  return await request.post({ url: '/pro/public-interest-litigation/create', data })
}

// 修改公益诉讼举报信息
export const updatePublicInterestLitigation = async (data: PublicInterestLitigationVO) => {
  return await request.put({ url: '/pro/public-interest-litigation/update', data })
}

// 删除公益诉讼举报信息
export const deletePublicInterestLitigation = async (id: number) => {
  return await request.delete({ url: '/pro/public-interest-litigation/delete?id=' + id })
}

// 导出公益诉讼举报信息 Excel
export const exportPublicInterestLitigationApi = async (params) => {
  return await request.download({ url: '/pro/public-interest-litigation/export-excel', params })
}